import { Status } from 'src/constants';

class WsResponseData {
  status: Status;
  message: string;
  constructor(message, status) {
    this.status = status;
    this.message = message;
  }
}

export class ChatSendWsResSuccData extends WsResponseData {
  data: {
    id: string;
  };
  constructor(id) {
    super('发送成功', Status.SUCCESS);
    this.data = {
      id,
    };
  }
}
// 发送消息
export class ChatSendWsResFailData extends WsResponseData {
  constructor() {
    super('发送失败', Status.FAILURE);
  }
}

export class ChatSendWsResFailData_1 extends WsResponseData {
  constructor() {
    super('你不在对方通讯录中', Status.FAILURE);
  }
}

// 添加好友请求
export class AddFriendWsResSuccData extends WsResponseData {
  constructor() {
    super('成功发送好友请求', Status.SUCCESS);
  }
}

export class AddFriendWsResFailData_1 extends WsResponseData {
  constructor() {
    super('对方通讯录中有自己', Status.FAILURE);
  }
}

export class AddFriendWsResFailData_2 extends WsResponseData {
  constructor() {
    super('已经添加过对方，请等待对方回应', Status.FAILURE);
  }
}

// 处理好友请求
export class DealWithAddFriendWsResSuccData extends WsResponseData {
  constructor() {
    super('成功处理好友请求', Status.SUCCESS);
  }
}

export class DealWithAddFriendWsResFailData extends WsResponseData {
  constructor() {
    super('处理好友请求失败', Status.SUCCESS);
  }
}
